﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace VSDebugTutorial
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Read();
            string[] strNames = { "Name1", "Name2", "Name3", "Name4", "Name5", "Name6" };

            foreach (string name in strNames)
            {
                Console.WriteLine(name);   // BreakPoint
            }
            int temp = 4;
            for (int i = 1; i <= 10; i++)
            {
                if (i > 6)
                    temp = 5;
            }



            //Debug mutilthread program
            Thread one= new Thread(new ThreadStart(Go));
            one.Name = "ThreadOne";
            Thread two = new Thread(new ThreadStart(Go));
            two.Name = "ThreadTwo";
            one.Start();
            two.Start();
            Go();
        }

        private static void Go()
        {
            Console.WriteLine("Hello");
        }

        public static void Method1()
        {
            Console.WriteLine("Break Point in Method1");   // BreakPoint
        }

        public static void Method2()
        {
            Console.WriteLine("Break Point in Method2");  // BreakPoint
            Console.WriteLine("Break Point in Method2");  // BreakPoint
        }

        public static void Method3()
        {
            Console.WriteLine("Break Point in Method3");  // Breakpoint
        }

    }

}
